<?php
  session_start();

  if(!isset($_SESSION['isLogged'])){
    header('Location: index.php');
  }
  $now=time();
  if($now>$_SESSION['expired']){
    session_unset();
    session_destroy();
    header('Location: index.php');
  }

?>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
   <meta charset="utf-8" />
   <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
   <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
   <!-- Mobile viewport optimized: h5bp.com/viewport -->
   <meta name="viewport" content="width=device-width">

   <title>Portal Aplikasi Administrasi Kepegawaian</title>

   <!-- remove or comment this line if you want to use the local fonts -->
   <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700' rel='stylesheet' type='text/css'>

   <link rel="stylesheet" type="text/css" href="assets/css/bootmetro.css">
   <link rel="stylesheet" type="text/css" href="assets/css/bootmetro-responsive.css">
   <link rel="stylesheet" type="text/css" href="assets/css/bootmetro-icons.css">
   <link rel="stylesheet" type="text/css" href="assets/css/bootmetro-ui-light.css">
   <link rel="stylesheet" type="text/css" href="assets/css/datepicker.css">

   <!--  these two css are to use only for documentation -->
   <link rel="stylesheet" type="text/css" href="assets/css/demo.css">

   <!-- Le fav and touch icons -->
   <link rel="shortcut icon" href="./assets/ico/favicon.ico">
   <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
   <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
   <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
   <link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
  
   <!-- All JavaScript at the bottom, except for Modernizr and Respond.
      Modernizr enables HTML5 elements & feature detects; Respond is a polyfill for min/max-width CSS3 Media Queries
      For optimal performance, use a custom Modernizr build: www.modernizr.com/download/ -->
   <script src="assets/js/modernizr-2.6.2.min.js"></script>
   <style type="text/css">
        #alerts-container {
        position: fixed;
        top: 5px;
        right: 5px;
        padding: 0;
        z-index: 1100;
        }
         
        #alerts-container .toast {
        /* add a shadow */
        -webkit-box-shadow: 0 3px 7px rgba(255, 0, 0, 0.3);
        box-shadow: 0 3px 7px rgba(255, 0, 0, 0.3);
        }
        #alerts-container .toast-body {
        /* add a shadow */
        background-color: rgba(200, 54, 54, 0.5);
        }
   </style>
   <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-3182578-6']);
      _gaq.push(['_trackPageview']);
      (function() {
         var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
         ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
         var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

      
   </script>
</head>

<body>
  <div id="alerts-container"></div>
   <!--[if lt IE 7]>
   <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
   <![endif]-->

   <!-- Header
   ================================================== -->
   <header id="nav-bar" class="container">
      <div class="row">
         <div class="span12">
            <div id="header-container">
               <a id="backbutton" class="win-backbutton win-commandicon win-commandring icon-globe" href="#"></a>
               <h5>PORTAL APLIKASI</h5>
               <div class="dropdown">
                  <a class="header-dropdown dropdown-toggle accent-color" data-toggle="dropdown" href="#" >
                     Pengaturan
                     <b class="caret"></b>
                  </a>
                  <ul class="dropdown-menu">
                  <li><a data-toggle="modal" href="#myModalProfil" class="icon-user-2" onclick="getProfil()"> Profil</a></li>
                  <li><a id="passModal" data-toggle="modal" href="#myModal2" class="icon-wrench" onclick="ubahPass()"> Ubah Password</a></li>
                  <li id="pic" style="display:none;"><a data-toggle="modal" href="#myModalRekamUser" class="icon-user-add"> Rekam User</a></li>
                  <li class="divider"></li>
                  <li><a href="logout.php" class="icon-logout"> Logout</a></li>
               </ul>
            </div>
            </div>
            <div id="top-info" class="pull-right">
            <a id="settings" href="#" class="win-command pull-right">
               <span class="win-commandicon win-commandring icon-user-2"></span>
            </a>
            <!-- <a id="logged-user" href="#" class="win-command pull-right">
               <span class="win-commandicon win-commandring icon-user"></span>
            </a> -->
            <div class="pull-left">
               <h3 id="nama"></h3>
               <h4 id="unit"></h4>
            </div>
         </div>
      </div>
      </div>
   </header>
   
   <div class="container">
          <div class="listview grid-layout big">
     
             <div class="listview-item big bg-color-blue" id="ijin_luar">
                <div class="pull-left" href="#">
                <div class="listview-item-object icon-globe-2"></div>
                </div>
                <div class="listview-item-body">
                <h4 class="listview-item-heading">Ijin Luar Negeri</h4>
                <p class="two-lines">Sistem Infomasi Administrasi Ijin Ke Luar Negeri Pegawai Lingkup Direktorat Jenderal Perbendaharaan</p>
                </div>
             </div>
              
              
              
             <div class="listview-item big bg-color-green" id="ecuti">
                <div class="pull-left" href="#">
                <div class="listview-item-object icon-office"></div>
                </div>
                <div class="listview-item-body">
                <h4 class="listview-item-heading">eCuti</h4>
                <p class="two-lines">Sistem Infomasi Administrasi Cuti Pegawai Lingkup Direktorat Jenderal Perbendaharaan</p>
                </div>
             </div>
           
          </div>
   </div>   <div id="charms" class="win-ui-dark slide">
   
      <div id="theme-charms-section" class="charms-section">
         <div class="charms-header">
            <a href="#" class="close-charms win-backbutton"></a>
            <h2>Settings</h2>
         </div>
   
         <div class="row-fluid">
            <div class="span12">
   
               <form class="">
                  <label for="win-theme-select">Change theme:</label>
                  <select id="win-theme-select" class="">
                     <option value="metro-ui-light">Light</option>
                     <option value="metro-ui-dark">Dark</option>
                  </select>
               </form>
   
            </div>
         </div>
      </div>
   
   </div>
   

   <!-- <a id="show-toast-button" href="#toast-example1" class="btn btn-success">Show Toast!</a> -->
 
    <div id="toast-example1" class="toast toasttext02 fade">
      <button type="button" class="close" data-dismiss="alert"></button>
        <div class="pull-left">
          <img src="..." class="img-circle icon-warning">
        </div>
      <div class="toast-body">
      <h4 class="toast-heading">Warning</h4>
      <p id="error"></p>
      </div>
    </div>

<!-- Modal Ubah Password-->
   <div id="myModal2" class="modal message hide fade">
         <div class="modal-header">
         <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
         <h3>Ubah Password</h3>
         </div>
         <div class="modal-body">
              <div class="alert" style="display:none;">
              <button type="button" class="close" data-dismiss="alert"></button>
              <strong>Warning!</strong><h4 id="error"></h4>
              </div>
              <p id="ket"></p>
            <form class="form-horizontal">
              <input type="hidden"  class="form-control" id="id_user">
              <div class="control-group">
            <label class="control-label" for="inputPassword">NIP</label>
            <div class="controls">
              <input type="text"  class="form-control" id="nip" disabled>
              </div>
            </div>
            <div class="control-group">
            <label class="control-label" for="inputPassword">Password Lama</label>
            <div class="controls">
            <input type="password" id="password_lama" placeholder="Password">
            </div>
            </div>
            <div class="control-group">
            <label class="control-label" for="inputPassword">Password Baru</label>
            <div class="controls">
            <input type="password" id="password_baru" placeholder="Password">
            </div>
            </div>
            <div class="control-group">
            <label class="control-label" for="inputPassword">Ulangi Password</label>
            <div class="controls">
            <input type="password" id="password_baru2" placeholder="Password">
            </div>
            </div>
            <button type="submit" class="btn" id="simpan_password">Simpan</button>
            </div>
            </div>
            </form>
         </div>
   </div>

<!--Modal Profil -->


<div id="myModalProfil" class="modal message hide fade">
         <div class="modal-header">
         <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
         <h3>Profil Pegawai</h3>
         </div>
         <div class="modal-body">
          <div class="progress" style="display: none;" id="loader">
          <div class="win-ring"></div>
          </div>
            <div id="profil">
             <table class="table table-bordered">
                <tr>
                  <th>NIP</th>
                  <td id="nip_td"></td>
                </tr>
                <tr>
                  <th>Nama</th>
                  <td id="nama_td"></td>
                </tr>
                <tr>
                  <th>Golongan</th>
                  <td id="gol_td"></td>
                </tr>
                <tr>
                  <th>Jabatan</th>
                  <td id="jabatan_td"></td>
                </tr>
                <tr>
                  <th>Unit</th>
                  <td id="unit_td"></td>
                </tr>
                <tr>
                  <th>Unit Eselon II</th>
                  <td id="esel_td"></td>
                </tr>
            </table>
          </div>
         </div>
   </div>

   <!-- Modal Rekam User -->
   <div id="myModalRekamUser" class="modal message hide fade">
         <div class="modal-header">
         <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
         <h3>Rekam User</h3>
         </div>
         <div class="modal-body">
          <div class="progress" style="display: none;" id="loader">
          <div class="win-ring"></div>
          </div>
            <div id="profil">
             <form role="form" id="rekam_frm" method="post" class="form-horizontal">
                        <input type="hidden" class="form-control" id="id_user">
                        <div class="control-group">
                            <label class="control-label" for="nip">NIP</label>
                            <div class="controls">
                            <input type="text" max="18"  class="form-control" id="nip" placeholder="Masukkan NIP">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="password">Password</label>
                            <div class="controls">
                            <input type="password" class="form-control" id="password" placeholder="Password">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="password2">Ulangi Password</label>
                            <div class="controls">
                            <input type="password" class="form-control" id="password2" placeholder="Password">
                            </div>
                        </div>
                        <div class="control-group" style="display: none;" id="div_kanwil">
                            <label class="control-label" for="kanwil">Kanwil</label>
                            <div class="controls">
                            <select  id="kanwil" name="kanwil" class="form-control">
                            </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="level">Kewenangan</label>
                            <div class="controls">
                            <select class="form-control" id="kewenangan" name="kewenangan">
                            </select>
                            </div>
                        </div>
                        <button type="submit" class="btn btn-default" id="btn_simpan">Simpan</button>

                    </form>
          </div>
         </div>
   </div>

   <!-- Grab Google CDN's jQuery. fall back to local if necessary -->
   <script src="//code.jquery.com/jquery-1.10.0.min.js"></script>
   <script>window.jQuery || document.write("<script src='assets/js/jquery-1.10.0.min.js'>\x3C/script>")</script>

   <!--[if IE 7]>
   <script type="text/javascript" src="scripts/bootmetro-icons-ie7.js">
   <![endif]-->

   <script type="text/javascript" src="assets/js/min/bootstrap.min.js"></script>
   <script type="text/javascript" src="assets/js/bootmetro-panorama.js"></script>
   <script type="text/javascript" src="assets/js/bootmetro-pivot.js"></script>
   <script type="text/javascript" src="assets/js/bootmetro-charms.js"></script>
   <script type="text/javascript" src="assets/js/bootstrap-datepicker.js"></script>

   <script type="text/javascript" src="assets/js/jquery.mousewheel.min.js"></script>
   <script type="text/javascript" src="assets/js/jquery.touchSwipe.min.js"></script>

   <script type="text/javascript" src="assets/js/holder.js"></script>
   <!--<script type="text/javascript" src="./assets/js/perfect-scrollbar.with-mousewheel.min.js"></script>-->
   <script type="text/javascript" src="assets/js/demo.js"></script>
   <script type="text/javascript" src="js/portal.js"></script>

   <script type="text/javascript">

      $('.panorama').panorama({
         //nicescroll: false,
         showscrollbuttons: true,
         keyboard: true,
         parallax: true
      });

//      $(".panorama").perfectScrollbar();

      $('#pivot').pivot();

   </script>
</body>
</html>